<?php

/**
 * BbTeams form.
 *
 * @package    vogue
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class BbTeamsForm extends BaseBbTeamsForm
{
  public function configure()
  {
		unset($this['id'],$this['t_yteam']);
    
	   	# WIDGETS
      $this->widgetSchema['t_name']       = new sfWidgetFormInputText(array(), array('style'=>'width:400px;'));
      $this->widgetSchema['t_abrname']       = new sfWidgetFormInputText(array(), array('style'=>'width:40px;'));
      $this->widgetSchema['t_descr']       = new sfWidgetFormTextarea(array(), array('style'=>'width:400px;'));
      $this->widgetSchema['def_img']       = new sfWidgetFormInputFile(array(), array());
      $this->widgetSchema['t_emblem']       = new sfWidgetFormInputFile(array(), array());
      $this->widgetSchema['t_city']       = new sfWidgetFormInputText(array(), array('style'=>'width:400px;'));
	
    	# VALIDATORS		
    	$this->validatorSchema['t_name']       = new sfValidatorString(array(), array());
    	$this->validatorSchema['t_descr']  	    = new sfValidatorPass();
    	$this->validatorSchema['t_city']        = new sfValidatorPass();
    	$this->validatorSchema['t_emblem']       = new sfValidatorFile(
                                                  array('required' => false,
                                                      'path'       => sfConfig::get("sf_upload_dir")."/team",
                                                      'max_size'   => 209715200,
                                                      'mime_types' =>  array('image/jpeg','image/pjpeg','image/png','image/x-png','image/gif',)),
                                                  array(
                                                      'max_size'   => 'Файлын хэмжээ хамгийн ихдээ 20MB байна',
                                                      'mime_types' => 'Дараах өргөтгөлтэй файлууд зөвшөөрөгдөнө: jpg, png, gif'));
		$this->validatorSchema['def_img']       = new sfValidatorFile(
                                                  array('required' => false,
                                                      'path'       => sfConfig::get("sf_upload_dir")."/team",
                                                      'max_size'   => 209715200,
                                                      'mime_types' =>  array('image/jpeg','image/pjpeg','image/png','image/x-png','image/gif',)),
                                                  array(
                                                      'max_size'   => 'Файлын хэмжээ хамгийн ихдээ 20MB байна',
                                                      'mime_types' => 'Дараах өргөтгөлтэй файлууд зөвшөөрөгдөнө: jpg, png, gif'));


      $this->widgetSchema->setHelp('t_emblem', 'x px - png | gif | jpg');
      $this->widgetSchema->setHelp('def_img', 'x px - png | gif | jpg');
      
      // LABELS      
      $this->widgetSchema->setLabel('t_name', 'Нэр');
      $this->widgetSchema->setLabel('t_abrname', 'Товчилсон нэр');
      $this->widgetSchema->setLabel('t_descr', 'Тухай');
      $this->widgetSchema->setLabel('def_img', 'Зураг');
      $this->widgetSchema->setLabel('t_emblem', 'Лого');
      $this->widgetSchema->setLabel('t_city', 'Компани');      
		
  }
}
